package mobilesearch.receiver;

import java.util.ArrayList;

import mobilesearch.data.CallLogData;
import mobilesearch.ui.OnSearchResultListener;
import android.util.Log;

public class CallLogReceiver {
	private static final String TAG = "CallLogReceiver";
	private ArrayList<CallLogData> callLogList;
	private OnSearchResultListener listener;
	
	public CallLogReceiver(ArrayList<CallLogData> callLogList, OnSearchResultListener listener) {
		this.callLogList = callLogList;
		this.listener = listener;
	}
	
	public void processCallLogData(){
		int size = this.callLogList.size();
		Log.i(TAG, "call log list"+ size);
		for(int i = 0; i < size; i++){
			CallLogData data = this.callLogList.get(i);
			String phoneNumber = data.getPhoneNumber();
			String date = data.getDate();
			this.listener.onReceiveCallLogData(phoneNumber, date);
		}
	}

}
